/*
 * BaseSample.java
 *
 * Created on April 17, 2007, 12:02 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package Experience;

import java.util.Vector;

/**
 *
 * @author dmgreen
 */
public class BaseSample {
    
    private static int global_uid = 0;
    
    private Vector myTags;
    protected int myGlucose;
    private int myUID;
    
    /** Creates a new instance of BaseSample */
    public BaseSample() {
        
        myTags    = new Vector(); 
        myGlucose = 9999;
        
        myUID = global_uid;
        global_uid++;
    }
    
    public static int generateUID() {
        // DO I NEED threadsafeness here ?!?
        
        int cur_gid = global_uid;
        global_uid++;
        
        return cur_gid;
    }
    
    public void setTags(String[] tags) {
        myTags.removeAllElements();
        
        for (int i=0; i<tags.length; i++) {
            myTags.addElement(tags[i]);
        }
        // maybe should we append instead of replace?
    }
    
    public int getUID() {
        return myUID;
    }
    
    public Vector getTags() {
        return myTags;
    }
    
     public void setGlucose(int gluco) {
        myGlucose = gluco;
    }
        
    public int getGlucose() {
        return myGlucose;
    }

    public String getType() {
        return "";
    }
}
